package com.lxg;

import com.lxg.dao.BookDao;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import javax.sql.DataSource;

/**
 * Hello world!
 *
 */
public class AppSystemProperties {
    public static void main( String[] args ) {

        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
        DataSource dataSource = (DataSource) context.getBean("dataSource");
        System.out.println(dataSource);

        BookDao bookDao = (BookDao) context.getBean("bookDao");
        bookDao.save();

    }
}
